<template>
<div>
  <div style="display: flex;justify-content: center">
    <h1>日志信息</h1>
  </div>
  <el-table :data="cutBean.records" border style="width: 100%">
    <el-table-column prop="loginDate" label="日期" width="300" />
    <el-table-column prop="content" label="内容" />
  </el-table>
<!--分页模块-->
  <el-pagination
      v-model:currentPage="cutBean.current"
      v-model:page-size="cutBean.size"
      background
      layout="prev, pager, next, jumper"
      :total="cutBean.total"
      @current-change="findByItem"
  />
<!-- 条件查询 -->
  <div style="width: 300px;height: 200px;border: 1px #000 solid;line-height: 30px;margin-left: 600px;margin-top: 50px">
    <h5>查询日志信息</h5>
  <div class="block">
    <span class="demonstration">起始日期:</span>
    <el-date-picker
        v-model="findObj.startDate"
        type="date"
        format="YYYY-MM-DD"
        value-format="YYYY-MM-DD"
        placeholder="Pick a week"
    />
  </div>
  <div class="block">
    <span class="demonstration">结束日期:</span>
    <el-date-picker
        v-model="findObj.endDate"
        type="date"
        format="YYYY-MM-DD"
        value-format="YYYY-MM-DD"
        placeholder="Pick a week"
    />
  </div>
    <el-button type="success" @click="findByItem(1)">查询</el-button>
</div>
</div>
</template>

<script>
import axios from "axios"
export default {
name: "journal",
data(){
    return{
      cutBean:{},
      findObj:{},
        }
    },
  methods:{
  findByItem(pageNO){
    this.findObj.pageNO=pageNO;
    axios.get("/project/journal/findByItem",{params:{
        pageNO:this.findObj.pageNO,
        startDate:this.findObj.startDate,
        endDate:this.findObj.endDate,
      }}).then(resp=>{
          this.cutBean=resp.data;
    })
  }
  },
  created() {
  this.findByItem(1);
  }
}
</script>

<style scoped>

</style>